﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewCommentFormat.aspx.cs" Inherits="MyBBS.Views.Shared.NewCommentFormat" %>
<%
    var response = Context.Response;
    response.Clear();
    response.ContentType = "text/html";
    var comment = ViewData.Model;
    string className = comment.IsOdd ? "comment odd" : "comment even";
    
    StringBuilder responseString = new StringBuilder();
    responseString.Append("<div class=" + className + ">");
    responseString.Append("<div>");
    responseString.Append(comment.Content);
    responseString.Append("</div>");
    responseString.Append("<div class=\"postedBy\">");
    responseString.Append("posted by ");
    responseString.Append("<span class=\"user\">");
    responseString.Append(comment.Author);
    responseString.Append("</span>");
    responseString.Append("<span class=\"time\"> ");
    responseString.Append(comment.SubmitTime.ToString("U")); 
    responseString.Append("</span></div></div>");                
                        
    response.Write(responseString.ToString());    
%>
